{% extends "../../theme/base.html" %}

{% block zhuti %}


<script type="text/javascript">
    $().ready(function () {
        $("#form_post").validate(
                {
                    rules: {
                        title: {
                            required: true
                        },
                        cnt_md: {
                            required: true
                        }
                    },
                    messages: {
                        title: {
                            required: "<span class='red'>请输入标题</span>"

                        },
                        cnt_md: {
                            required: "<span class='red'>请输入内容</span>"
                        }
                    }
                }
        );
    });
</script>



<div class="panel panel-black">
    <div class="panel-heading">输入地图相关信息</div>

    <div class="panel-body">
        <form action="" method="post" class="form-horizontal" id="form_post" role="form">

            <fieldset>

                <input type="hidden" id="uid" name="uid" value="{{ kwd['uid'] }}">


                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">标题</label>

                    <div class="col-sm-10">
                        <input type="text" id="title" name="title" value="" class="form-control">
                    </div>
                </div>

                <div class="form-group">
                    <label for="keywords" class="col-sm-2 control-label">关键词</label>

                    <div class="col-sm-10">
                        <input type="text" id="keywords" name="keywords" value=""
                               class="form-control">
                    </div>
                </div>

                <div class="form-group">
                    <label for="tags" class="col-sm-2 control-label">标签</label>

                    <div class="col-sm-10">
                        <input type="text" id="tags" name="tags" class="form-control" value="">
                    </div>
                </div>

                <div class="form-group">
                    <label for="ext_lat" class="col-sm-2 control-label">lat</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_lat" name="ext_lat" class="form-control" value="">
                    </div>
                </div>


                <div class="form-group">
                    <label for="ext_lon" class="col-sm-2 control-label">lon</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_lon" name="ext_lon" class="form-control" value="">
                    </div>
                </div>

                <div class="form-group">
                    <label for="ext_zoom_max" class="col-sm-2 control-label">zoom_max</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_zoom_max" name="ext_zoom_max" class="form-control"
                               value="">
                    </div>
                </div>


                <div class="form-group">
                    <label for="ext_zoom_min" class="col-sm-2 control-label">zoom_min</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_zoom_min" name="ext_zoom_min" class="form-control"
                               value="">
                    </div>
                </div>


                <div class="form-group">
                    <label for="ext_zoom_current" class="col-sm-2 control-label">zoom_current</label>

                    <div class="col-sm-10">
                        <input type="text" id="ext_zoom_current" name="ext_zoom_current" class="form-control"
                               value="">
                    </div>
                </div>


                <div class="form-group">
                    <label for="desc" class="col-sm-2 control-label">描述</label>

                    <div class="col-sm-10">
                        <textarea rows=4 id="desc" name="desc" cols="70" class="form-control"></textarea>
                    </div>

                </div>


                <div class="form-group">
                    <label class="col-sm-2 control-label">分类</label>

                    <div class="col-sm-10">
                        {% for ii in range(1,6) %}
                        <select name="cat_{{ ii }}" id="cat_{{ ii }}" class="form-control">
                            <option value="">请选择</option>
                            {% for taginfo in tag_infos %}
                            <option value="{{ taginfo.uid }}"   >{{ taginfo.name }}
                            </option>
                            {% end %}
                        </select>
                        {% end %}
                    </div>

                </div>


                <div class="form-group">


                    <label for="up" class="col-sm-2 control-label">上传图片</label>

                    <div class="col-sm-10">
                    <span id="up"><a href="/pic/add" target="_blank"
                                     class="btn btn-primary">上传</a></span>
                    </div>

                </div>

                <div class="form-group">
                    <label for="cnt_md" class="col-sm-2 control-label">内容</label>

                    <div class="col-sm-10">
                        <textarea rows=16 id="cnt_md" name="cnt_md" cols="70" class="form-control"></textarea>
                    </div>
                </div>


                <div class="form-group">
                    <label for="sub1" class="col-sm-2 control-label"></label>

                    <div class="col-sm-10">
                        <input id="sub1" type="submit" value="更新数据" class="btn btn-primary">
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</div>
{% end %}


